<template>
  <div>
    <el-row >
      <el-col :span="22" :offset="1" >

        <el-card class="box-card" shadow="always" style="padding: 0 15px;">

          <el-row :gutter="0">
            <el-col :span="2" :offset="22" style="height:40px;line-height:40px;">
              <el-button type="success" @click="add">保存</el-button>
            </el-col>
          </el-row>

          <el-row>
            <el-col :span="24" :offset="0" style="margin-top:20px;">

              <el-form :label-position="labelPosition" :inline="true" :model="form" >
                <el-form-item align="left" class="width270Height40" label="员工编号">
                  <el-input v-model="form.id" placeholder="员工编号"></el-input>
                </el-form-item>
                <el-form-item align="left" class="width270Height40" label="员工姓名">
                  <el-input v-model="form.name" placeholder="员工姓名"></el-input>
                </el-form-item>
                <el-form-item align="left" class="width270Height40" label="患者年龄">
                  <el-input v-model="form.price" placeholder="患者年龄"></el-input>
                </el-form-item>
                <el-form-item align="left" class="width270Height40" label="性别">
                  <el-input v-model="form.price1" placeholder="性别"></el-input>
                </el-form-item>
                <el-form-item align="left" class="width270Height40" label="手机号码">
                  <el-input v-model="form.danwei" placeholder="手机号码"></el-input>
                </el-form-item>
                <el-form-item align="left" class="width270Height40" label="电子邮箱">
                  <el-input v-model="form.fenlei" placeholder="电子邮箱"></el-input>
                </el-form-item>
                <el-form-item align="left" class="width270Height40" label="证件号码">
                  <el-input v-model="form.leixing" placeholder="证件号码"></el-input>
                </el-form-item>
              </el-form>

            </el-col>
          </el-row>


          <el-row>
            <el-col :span="24" :offset="0" style="margin-top:20px;">

              <el-table
                :data="tableData" :header-cell-style="{lineHeight:'20px'}"
                stripe
                style="width: 100%">
                <el-table-column
                  prop="date"
                  label="序号"
                  width="180">
                </el-table-column>
                <el-table-column
                  prop="name"
                  label="药品编码"
                  width="180">
                </el-table-column>
                <el-table-column
                  prop="address"
                  label="药品名称">
                </el-table-column>
                <el-table-column
                  prop="address"
                  label="药品规格">
                </el-table-column>
                <el-table-column
                  prop="address"
                  label="数量">
                </el-table-column>
                <el-table-column
                  prop="address"
                  label="单位">
                </el-table-column>
                <el-table-column
                  prop="address"
                  label="单价">
                </el-table-column>
                <el-table-column
                  prop="address"
                  label="总价">
                </el-table-column>
                <el-table-column
                  prop="address"
                  label="编辑">
                </el-table-column>
              </el-table>

            </el-col>
          </el-row>

        </el-card>

      </el-col>
    </el-row>
  </div>
</template>

<script>
  export default {
    data() {
      return { tableData: [{
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1517 弄'
        }, {
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1519 弄'
        }, {
          date: '2016-05-03',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1516 弄'
        }],
        labelPosition: 'top',
        form: {
          id: '',
          name: '',
          price: '',
          price1: '',
          danwei: '',
          fenlei: '',
          leixing: '',
          date1: '',
          x: ""

        }
      };
    },
    methods: {
      onSubmit() {
        alert("保存成功")
        console.log('submit!');
      },
      back:function () {
        this.$router.push("/patient")
      }
    }
  }
</script>

<style scoped>
  .width270Height40{
    width: 270px;line-height:40px;float:left;margin-right:40px;
  }
</style>
